# -*- coding: utf-8 -*-


from datetime import datetime

def getCurrentTime():
    now = datetime.now()
    dt_string = now.strftime("%d/%m/%Y %H:%M:%S")
    return  dt_string

def readLocalTxt():
    with open('./resources/0309文本文件.txt', 'r',encoding='utf-8') as file:
        lines = file.readlines()
        for line in lines:
            # print(line)
            appendTxt(line)

def appendTxt(str):
    with open('./resources/0309文本文件输出.txt','a',encoding='utf-8') as file:
        file.write(getCurrentTime() + ' 点追加进来的数据：' + str)

# 主函数
if __name__ == "__main__":
    readLocalTxt()